<template>
  <div id="app">
    <div class="top">
    <div class="top-1">
      <div class="top-left">
        <van-icon name="comment-o" />
        <span >消息</span>
      </div>
      <van-search

        placeholder="搜索品牌或商品"
        background="#ff005d"
        shape="round"
        right-icon="point-gift-o"
      />
      <div class="top-right">
        <van-icon name="apps-o" />
        <span>分类</span>
      </div>
    </div>
    <div style=" display: -webkit-flex; display: flex;padding-top:1rem;font-size: 0.333333rem;
    color: #fff;">
      <router-link to='/list' class="nav">精品</router-link>
      <router-link to='/list2' class="nav">三折</router-link>
      <router-link to='/detail' class="nav">免费</router-link>
    </div>
  </div>
  <!--显示组件的内容-->
  <div class='content'>
    <router-view />
  </div>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      active: 0,
      hideNav: false,
    };
  },
  components: {},
};
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
#app {
  width: 100%;
  height: 100%;
}
#app {
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1;
  overflow: auto;
}
img {
  max-width: 100%;
}

.top-1 {
  width: 100%;
  background: #ff005d;
  height: 3.666667rem;
  padding-left: 0.133333rem;
  padding-right: 0.133333rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-left {
  font-size: 0.333333rem;
  color: #fff;
  /* line-height: 0.333333rem; */
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-left: 1rem;
}
.top-left .van-icon {
  font-size: 1.533333rem;
  font-weight: bold;
}
.top-right {
  font-size: 0.333333rem;
  color: #fff;
  /* line-height: 0.333333rem; */
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-right: 1rem;
}
.top-right .van-icon {
  font-size: 1.533333rem;
  font-weight: bold;
}

.nav{ display: block;width:28%;text-align: center;padding:0.5em auto;}
</style>